package net.zdreamer.shunyi.ui.fragment;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import net.zdreamer.shunyi.R;
import net.zdreamer.shunyi.myview.TriangleButton;
import net.zdreamer.shunyi.ui.TJWJActivity;
import net.zdreamer.shunyi.ui.myinfo.DuihuanActivity;
import net.zdreamer.shunyi.ui.myinfo.RenWuActivity;


public class BangHuiTaoJinFragment extends Fragment implements View.OnClickListener {
    private TriangleButton duihuan, renwu, wenjuan;
    private Intent intent;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_bang_hui_tao_jin, container, false);
    }


    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

    }

    @Override
    public void onStart() {
        super.onStart();
        duihuan = (TriangleButton) getView().findViewById(R.id.taojinduihuan);
        renwu = (TriangleButton) getView().findViewById(R.id.taojinrnewu);
        wenjuan = (TriangleButton) getView().findViewById(R.id.taojinwenjuan);
        duihuan.setOnClickListener(this);
        renwu.setOnClickListener(this);
        wenjuan.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.taojinduihuan:
                intent = new Intent(getActivity(), DuihuanActivity.class);
                startActivity(intent);
                break;
            case R.id.taojinrnewu:
                intent = new Intent(getActivity(), RenWuActivity.class);
                startActivity(intent);
                break;
            case R.id.taojinwenjuan:
                intent = new Intent(getActivity(), TJWJActivity.class);
                startActivity(intent);
                break;
            default:
                break;
        }
    }
}
